home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / vinegar (.txt) < prev    next >
Microsoft Windows Help File Content  |  1995-07-19  |  2KB  |  56 lines

  1. # vinegar - script to remove the symbolic links created by spray in 
  2. #        /usr/lib/X11 and /usr/skunk in order to be able to run the software 
  3. #        provided on the SCO Skunkware CD-ROM
  4. # Written 05-Aug-94 by rr@sco.com
  5. # Usage : vinegar <mount-point>
  6. #         Where <mount-point> is the directory on which the CD-ROM is mounted
  7. #         If mounted on /usr/skunk, no argument is necessary
  8. usage() {
  9.     echo "Usage: vinegar [mount-point]"
  10.     echo "\tWhere mount-point refers to the directory on which"
  11.     echo "\tthe CD-ROM is mounted. If no arguments are given, it"
  12.     echo "\tis assumed the CD-ROM is mounted on /usr/skunk."
  13.     exit 1
  14. Remove_Symlink() {
  15.     ls -l $1 | grep $MOUNT_PT > /dev/null && rm -f $1
  16. [ $# = 0 ] && MOUNT_PT=/usr/skunk
  17. [ $# = 1 ] && MOUNT_PT=$1
  18. [ $# -gt 1 ] && usage
  19. # check to see if the user has root privelege
  20. fuid=`id`
  21. uid=`echo $fuid | awk ' { print $1 } '`
  22. [ "$uid" = "uid=0(root)" ] || {
  23.     echo "You must have root priveleges to run vinegar."
  24.     usage
  25.     exit 1
  26. # check to make sure the cd is mounted and what we expect is there
  27. [ -f $MOUNT_PT/pics/README ] || usage
  28. [ -d $MOUNT_PT/lib/X11/app-defaults ] || usage
  29. APPDEFDIR=/usr/lib/X11/app-defaults
  30. SKUNKLIST="README RELEASE.NOTES \
  31.     audio bin cdmt etc games include info interviews lib man pics \
  32.         src tls usr xc"
  33. # clean up the X11 app-defaults directory
  34. [ -d $APPDEFDIR ] && {
  35.     cd $APPDEFDIR
  36.     for i in $MOUNT_PT/lib/X11/app-defaults/*
  37.         [ "$i" = "$MOUNT_PT/lib/X11/app-defaults/XMcd" ] && continue
  38.         Remove_Symlink `basename $i`
  39.     done
  40. # clean up the Fresco DLL's
  41. cd $MOUNT_PT/lib
  42. for i in *.so *.so.1.0
  43.     Remove_Symlink /usr/lib/$i
  44. # clean up the Willow symlink
  45. Remove_Symlink /usr/lib/X11/willow
  46. # clean up the Periodic uid file
  47. Remove_Symlink /usr/lib/X11/uid/periodic.uid
  48. # set up directory links in /usr/local/lib (for now)
  49. LOCALLIBDIRS="gcc-lib povray sc-6.21 xboing/levels xc xconq mosaic lynx \
  50.     X11"
  51. LOCALLIBFILS="libg++.a"
  52. for i in $LOCALLIBDIRS
  53.     Remove_Symlink /usr/local/lib/$i
  54. for i in $LOCALLIBFILS
  55.     Remove_Symlink /usr/local/lib/$i
  56.